package com.xingfly.school.course.acl.adapters.client;

import com.xingfly.school.course.acl.pl.response.StudentResponse;
import com.xingfly.school.course.acl.ports.clients.StudentClient;
import com.xingfly.school.student.ohs.local.appservices.StudentAppService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Set;

/**
 * Created by SuperS on 2020/3/30.
 *
 * @author SuperS
 */
@Component
public class StudentClientAdapter implements StudentClient {

    @Resource
    private StudentAppService studentAppService;

    @Override
    public List<StudentResponse> findStudentsByRegistrationIds(Set<Long> studentRegistrationIds) {
        return studentAppService.findStudentsByRegistrationIds(studentRegistrationIds);
    }

    @Override
    public Set<Long> findRegistrationIdsByCourseId(Long id) {
        return studentAppService.findRegistrationIdsByCourseId(id);
    }

}
